﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="index" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>首页 - 三剑客在线教育系统</title>
    <script type="text/javascript">
        function refresh() {
            document.getElementById("authImg").src = 'admin/inc/Validata.aspx?now=' + new Date();
        }
    </script>
    <link href="css/scrollert.css" type="text/css" rel="stylesheet" />
    <script language="javascript" type="text/javascript" src="js/Scroller.js"></script>
    <script language="javascript" type="text/javascript">
        function init_scroller() {
            var s_m_1 = new scrollVertical('intro', 'intro_con', 'tr');
            s_m_1.speed = 4000;
            s_m_1.isPause = true;
            var timer_start1 = setTimeout(function () { clearTimeout(timer_start1); s_m_1.isPause = false; }, 2000);
            zhiwei.Event.addEvent(s_m_1.scrollArea, 'mouseover', function () { s_m_1.isPause = true; });
            zhiwei.Event.addEvent(s_m_1.scrollArea, 'mouseout', function () { s_m_1.isPause = false; });
        }
        zhiwei.Event.addEvent(window, 'load', init_scroller);
    </script>
    <script type="text/javascript" src="js/myfocus-1.2.4.min.js"></script>
    <!--引入myFocus库-->
    <script type="text/javascript" src="js/pattern/mF_YSlider.js"></script>
    <!--引入风格应用js-->
    <link rel="stylesheet" href="js/pattern/mF_YSlider.css" />
    <!--引入风格应用css-->
    <script type="text/javascript">
        myFocus.set({
            id: 'boxID', //焦点图盒子ID
            pattern: 'mF_YSlider', //风格应用的名称
            time: 3, //切换时间间隔(秒)
            trigger: 'mouseover', //触发切换模式:'click'(点击)/'mouseover'(悬停)
            width: 310, //设置图片区域宽度(像素)
            height: 210, //设置图片区域高度(像素)
            txtHeight: 'default', //文字层高度设置(像素),'default'为默认高度，0为隐藏
            //autoZoom: true,
            waiting: false,
            path: false
        });
    </script>
    <link rel="stylesheet" href="../css/navstyle.css" media="all" />
    <link rel="stylesheet" href="../css/page.css" media="all" />
    <link rel="stylesheet" href="../css/articleStyle.css" media="all" />
</head>
<body>
    <form id="form1" runat="server">
    <div class="all">
        <div class="banner">
            <div class="logo">
            </div>
            <div class="blankleft">
            </div>
            <div class="blankalt">
            </div>
            <div class="blankrigth">
            </div>
        </div>
        <div class="NavBar">
            <div id="menu">
                <ul>
                    <li><a href="/" class="current"><span>首页</span></a></li>
                    <li><a href="../newsList.aspx"><span>新闻中心</span></a></li>
                    <li><a href="../javaList.aspx"><span>Java专区</span></a></li>
                    <li><a href="../netList.aspx"><span>.net专区</span></a></li>
                    <li><a href="../dataList.aspx"><span>数据库专区</span></a></li>
                    <li><a href="../otherList.aspx"><span>其他 专区</span></a></li>
                    <li><a href="../teacherList.aspx"><span>教师简介</span></a></li>
                    <li><a href="../aboutus.aspx"><span>关于我们</span></a></li>
                </ul>
            </div>
        </div>
        <div class="div_1">
            <div class="slide">
                <div id="boxID" style="visibility: hidden">
                    <!--焦点图盒子-->
                    <div class="loading">
                        <span>请稍候...</span></div>
                    <!--载入画面(可删除)-->
                    <ul class="pic">
                        <!--内容列表-->
                        <asp:Repeater ID="express_slide" runat="server">
                            <ItemTemplate>
                                <li><a href="<%# DataBinder.Eval(Container.DataItem, "slidelink")%>">
                                    <img src="<%# DataBinder.Eval(Container.DataItem, "piclink")%>" width="312px" height="210px"
                                        thumb="" alt="<%# DataBinder.Eval(Container.DataItem, "slidetitle")%>" text="<%# DataBinder.Eval(Container.DataItem, "slidetext")%>" /></a></li>
                            </ItemTemplate>
                        </asp:Repeater>
                    </ul>
                </div>
            </div>
            <div class="exp">
                <div class="logo">
                    <img src="images/exp.gif" alt="" width="320px" height="40px" border="0" usemap="#exp" />
                    <map name="exp" id="exp">
                        <area shape="rect" coords="255,14,297,32" href="newsList.aspx" alt="更多" />
                    </map>
                </div>
                <div class="area expList">
                    <ul>
                        <asp:Repeater ID="news_list" runat="server">
                            <ItemTemplate>
                                <li><span class="datetime">
                                    <%# DataBinder.Eval(Container.DataItem, "newstime", "{0:MM/dd}")%></span><a target="_blank"
                                        href="../news.aspx?id=<%# DataBinder.Eval(Container.DataItem, "ID")%>" title="<%# DataBinder.Eval(Container.DataItem, "title")%>">
                                        <%# DataBinder.Eval(Container.DataItem, "title").ToString().Length > 18 ? DataBinder.Eval(Container.DataItem, "title").ToString().Substring(0, 18) : DataBinder.Eval(Container.DataItem, "title").ToString()%>
                                    </a></li>
                            </ItemTemplate>
                        </asp:Repeater>
                    </ul>
                </div>
            </div>
            <div class="login">
                <% if (isLogin)
                   {%>
                <div class="text">
                    <%try
                      { %>
                    <%= Session["stuName"].ToString()%>
                    <%}
                      catch { } %>
                    欢迎您!<br />
                    拥有的金币值：<span style="color: Red;"><%=goldNum%></span><br />
                    购买课程数量：<span style="color: Red;"><%=cNum%></span><br />
                    下载的课件次数：<span style="color: Red;"><%=cwdNum%></span><br />
                    <a href="/stu/index.aspx" target="_blank">进入用户控制面板 </a>
                    <br />
                    <a href="/stu/logout.aspx?w=index" target="_self">注销登陆 </a>
                </div>
                <%}
                   else
                   { %>
                <br />
                <table width="100%">
                    <tr>
                        <td style="text-align: center; height: 40px">
                            用户名：
                        </td>
                        <td>
                            <asp:TextBox ID="tb_userID" runat="server" Width="100px" TabIndex="1"></asp:TextBox>
                        </td>
                        <td style="text-align: center;">
                            <asp:ImageButton ID="ibtn_login" runat="server" ImageUrl="../images/login.gif" OnClick="ibtn_login_Click"
                                TabIndex="3" />
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: center; height: 40px">
                            密&nbsp;&nbsp;码：
                        </td>
                        <td>
                            <asp:TextBox ID="tb_userPwd" runat="server" TextMode="Password" Width="100px" TabIndex="1"></asp:TextBox>
                        </td>
                        <td style="text-align: center;">
                            <asp:ImageButton ID="ibtn_register" runat="server" ImageUrl="../images/register.gif"
                                OnClick="ibtn_register_Click" TabIndex="3" />
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: center; height: 40px">
                            验证码：
                        </td>
                        <td>
                            <asp:TextBox ID="tb_code" runat="server" Width="60px" TabIndex="2"></asp:TextBox><img
                                src="admin/inc/Validata.aspx" alt="看不清？单击此处刷新验证码" width="35" height="17" id="authImg"
                                border="0" onclick="refresh();" />
                        </td>
                        <td>
                            <span style="color: #959595; text-align: left;">点击验证码刷新</span>
                        </td>
                    </tr>
                    <tr>
                    </tr>
                    <tr>
                        <td colspan="3" style="text-align: center; height: 35px">
                            <a href="../teacher/login.aspx" target="_blank">
                                <img src="images/teacherLogin.gif" alt="" /></a>
                        </td>
                    </tr>
                </table>
                <%} %>
            </div>
        </div>
        <div class="center">
        </div>
        <div class="main">
            <div class="news">
                <div class="news_1">
                    <div class="logo">
                        <img src="images/news_1.gif" alt="" border="0" usemap="#news1" />
                        <map name="news1" id="news1">
                            <area shape="rect" coords="269,17,312,33" href="javaList.aspx" alt="更多" />
                        </map>
                    </div>
                    <div class="area newsList">
                        <ul>
                            <asp:Repeater ID="javaList" runat="server">
                                <ItemTemplate>
                                    <li><span class="datetime">
                                        <%# DataBinder.Eval(Container.DataItem, "updatetime", "{0:MM/dd}")%></span><a target="_blank"
                                            href="../Course.aspx?id=<%# DataBinder.Eval(Container.DataItem, "courseID")%>"
                                            title="<%# DataBinder.Eval(Container.DataItem, "courseName")%>">
                                            <%# DataBinder.Eval(Container.DataItem, "courseName").ToString().Length > 18 ? DataBinder.Eval(Container.DataItem, "courseName").ToString().Substring(0, 18) : DataBinder.Eval(Container.DataItem, "courseName").ToString()%>
                                        </a></li>
                                </ItemTemplate>
                            </asp:Repeater>
                        </ul>
                    </div>
                    <div style="font: 0px/0px sans-serif; clear: both; display: block">
                    </div>
                </div>
                <div class="news_2">
                    <div class="logo">
                        <img src="images/news_2.gif" alt="" border="0" usemap="#news2" />
                        <map name="news2" id="news2">
                            <area shape="rect" coords="271,16,314,33" href="netList.aspx" alt="更多" />
                        </map>
                    </div>
                    <div class="area newsList">
                        <ul>
                            <asp:Repeater ID="netList" runat="server">
                                <ItemTemplate>
                                    <li><span class="datetime">
                                        <%# DataBinder.Eval(Container.DataItem, "updatetime", "{0:MM/dd}")%></span><a target="_blank"
                                            href="../Course.aspx?id=<%# DataBinder.Eval(Container.DataItem, "courseID")%>"
                                            title="<%# DataBinder.Eval(Container.DataItem, "courseName")%>">
                                            <%# DataBinder.Eval(Container.DataItem, "courseName").ToString().Length > 18 ? DataBinder.Eval(Container.DataItem, "courseName").ToString().Substring(0, 18) : DataBinder.Eval(Container.DataItem, "courseName").ToString()%>
                                        </a></li>
                                </ItemTemplate>
                            </asp:Repeater>
                        </ul>
                    </div>
                    <div style="font: 0px/0px sans-serif; clear: both; display: block">
                    </div>
                </div>
                <div class="news_3">
                    <div class="logo">
                        <img src="images/news_3.gif" alt="" border="0" usemap="#news3" />
                        <map name="news3" id="news3">
                            <area shape="rect" coords="270,16,311,33" href="dataList.aspx" alt="更多" />
                        </map>
                    </div>
                    <div class="area newsList">
                        <ul>
                            <asp:Repeater ID="dataList" runat="server">
                                <ItemTemplate>
                                    <li><span class="datetime">
                                        <%# DataBinder.Eval(Container.DataItem, "updatetime", "{0:MM/dd}")%></span><a target="_blank"
                                            href="../Course.aspx?id=<%# DataBinder.Eval(Container.DataItem, "courseID")%>"
                                            title="<%# DataBinder.Eval(Container.DataItem, "courseName")%>">
                                            <%# DataBinder.Eval(Container.DataItem, "courseName").ToString().Length > 18 ? DataBinder.Eval(Container.DataItem, "courseName").ToString().Substring(0, 18) : DataBinder.Eval(Container.DataItem, "courseName").ToString()%>
                                        </a></li>
                                </ItemTemplate>
                            </asp:Repeater>
                        </ul>
                    </div>
                    <div style="font: 0px/0px sans-serif; clear: both; display: block">
                    </div>
                </div>
                <div class="news_4">
                    <div class="logo">
                        <img src="images/news_4.gif" alt="" border="0" usemap="#news4" />
                        <map name="news4" id="news4">
                            <area shape="rect" coords="269,16,313,33" href="otherList.aspx" alt="更多" />
                        </map>
                    </div>
                    <div class="area newsList">
                        <ul>
                            <asp:Repeater ID="otherList" runat="server">
                                <ItemTemplate>
                                    <li><span class="datetime">
                                        <%# DataBinder.Eval(Container.DataItem, "updatetime", "{0:MM/dd}")%></span><a target="_blank"
                                            href="../Course.aspx?id=<%# DataBinder.Eval(Container.DataItem, "courseID")%>"
                                            title="<%# DataBinder.Eval(Container.DataItem, "courseName")%>">
                                            <%# DataBinder.Eval(Container.DataItem, "courseName").ToString().Length > 18 ? DataBinder.Eval(Container.DataItem, "courseName").ToString().Substring(0, 18) : DataBinder.Eval(Container.DataItem, "courseName").ToString()%>
                                        </a></li>
                                </ItemTemplate>
                            </asp:Repeater>
                        </ul>
                    </div>
                    <div style="font: 0px/0px sans-serif; clear: both; display: block">
                    </div>
                </div>
            </div>
            <div class="main_2">
                <div class="courseHit">
                    <div class="logo">
                        <img src="images/hot.gif" alt="" /></div>
                    <table class="tab">
                        <asp:Repeater ID="hot_list" runat="server">
                            <ItemTemplate>
                                <tr>
                                    <td align="left" width="200">
                                        &nbsp;&nbsp;<a href="Course.aspx?id=<%# DataBinder.Eval(Container.DataItem, "courseid")%>" target="_blank"><%# DataBinder.Eval(Container.DataItem, "courseName").ToString().Length > 15 ? DataBinder.Eval(Container.DataItem, "courseName").ToString().Substring(0, 15) + "..." : DataBinder.Eval(Container.DataItem, "courseName").ToString()%></a>
                                    </td>
                                    <td align="center">
                                        <%# DataBinder.Eval(Container.DataItem, "num")%>
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </table>
                </div>
                <div class="teacher">
                    <div class="logo">
                        <img src="images/teacher.gif" alt="" /></div>
                    <div id="intro">
                        <div id="intro_con" style="position: absolute; top: 0px; left: 0px;">
                            <table width="100%" cellpadding="0" cellspacing="0">
                                <tbody>
                                    <asp:Repeater ID="teacherList_1" runat="server">
                                        <ItemTemplate>
                                            <tr>
                                                <td width="50" align="center">
                                                    <a href="teacher.aspx?id=<%# DataBinder.Eval(Container.DataItem, "teacherid")%>">
                                                        <img src="<%# DataBinder.Eval(Container.DataItem, "picUrl")%>" alt="<%# DataBinder.Eval(Container.DataItem, "teacherName")%>"
                                                            style="width: 48px; height: 58px; border: 1px #ccc solid;" align="left"></a>
                                                </td>
                                                <td align="left">
                                                    <div>
                                                        <span class="name"><%# DataBinder.Eval(Container.DataItem, "teacherName")%></span><br />
                                                        <span class="txt"><%# DataBinder.Eval(Container.DataItem, "about").ToString().Length < 34 ? DataBinder.Eval(Container.DataItem, "about").ToString() : DataBinder.Eval(Container.DataItem, "about").ToString().Substring(0,31)+"..."%></span>
                                                    </div>
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </tbody>
                            </table>
                        </div>
                        <div id="intro_copymsgid" style="height: 1200px; position: absolute; top: 1200px;
                            left: 0px;">
                            <table width="100%" cellpadding="0" cellspacing="0">
                                <tbody>
                                    <asp:Repeater ID="teacherList_2" runat="server">
                                        <ItemTemplate>
                                            <tr>
                                                <td width="50" align="center">
                                                    <a href="teacher.aspx?id=<%# DataBinder.Eval(Container.DataItem, "teacherid")%>">
                                                        <img src="<%# DataBinder.Eval(Container.DataItem, "picUrl")%>" alt="<%# DataBinder.Eval(Container.DataItem, "teacherName")%>"
                                                            style="width: 48px; height: 58px; border: 1px #ccc solid;" align="left"></a>
                                                </td>
                                                <td align="left">
                                                    <div>
                                                        <span class="name"><%# DataBinder.Eval(Container.DataItem, "teacherName")%></span><br />
                                                        <span class="txt"><%# DataBinder.Eval(Container.DataItem, "about").ToString().Length < 30 ? DataBinder.Eval(Container.DataItem, "about").ToString() : DataBinder.Eval(Container.DataItem, "about").ToString().Substring(0,27)+"..."%></span>   
                                                    </div>
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="bottom">
            <div class="blogroll">
                <img src="images/blogrool.gif" alt="" height="31" width="88" border="0" />
                <asp:Repeater ID="blogrollList" runat="server">
                    <ItemTemplate>
                        <a href="http://<%# DataBinder.Eval(Container.DataItem, "sitelink")%>" target="_blank">
                            <img src="<%# DataBinder.Eval(Container.DataItem, "siteLogo")%>" height="31" width="88"
                                alt="<%# DataBinder.Eval(Container.DataItem, "siteAlt")%>" border="0" /></a>
                    </ItemTemplate>
                </asp:Repeater>
            </div>
        </div>
        <div class="splitred">
        </div>
        <div class="copyright">
            <% =strcr %>
        </div>
        <div style="font: 0px/0px sans-serif; clear: both; display: block">
        </div>
    </div>
    </form>
</body>
</html>
